<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
switch (Request::param('page')) {
    case 'text':
        $return = new TextReturn(file_get_contents('skin://main.xml'));
        break;
    case 'image':
        $title = Request::param('title');
        $text = Request::param('text');
        if (!$title || !$text) Log::fatal('Specify title or text for new novelty.');
        $folder = DataSource::selectRecord('self, cercea, $folder.', 'folder.id = '.Request::param('folder'));

        $return = new TextReturn(file_get_contents('skin://main.xml'));
        break;
}
?>
